# Maple integration test file: "4 Trig functions\4.3 Tangent\4.3.9 trig^m (a+b tan^n+c tan^(2 n))^p.txt"

lst:=[

# Integrands of the form Trig[d+e x]^m (a+b Tan[d+e x]^n+c Tan[d+e x]^(2 n))^p

# Integrands of the form Sin[d+e x]^m (a+b Tan[d+e x]^n+c Tan[d+e x]^(2 n))^p

# Integrands of the form Cos[d+e x]^m (a+b Tan[d+e x]^n+c Tan[d+e x]^(2 n))^p

# Integrands of the form Tan[d+e x]^m (a+b Tan[d+e x]^n+c Tan[d+e x]^(2 n))^p

# Integrands of the form Tan[d+e x]^m (a+b Tan[d+e x]+c Tan[d+e x]^2)^(p/2)

# p>0
[sqrt(a+b*tan(d+e*x)+c*tan(d+e*x)^2)*tan(d+e*x)^5,x,21,-1/16*b*(b^2-4*a*c)*arctanh(1/2*(b+2*c*tan(d+e*x))/(sqrt(c)*sqrt(a+b*tan(d+e*x)+c*tan(d+e*x)^2)))/(c^(5/2)*e)+1/256*b*(7*b^2-12*a*c)*(b^2-4*a*c)*arctanh(1/2*(b+2*c*tan(d+e*x))/(sqrt(c)*sqrt(a+b*tan(d+e*x)+c*tan(d+e*x)^2)))/(c^(9/2)*e)+1/2*b*arctanh(1/2*(b+2*c*tan(d+e*x))/(sqrt(c)*sqrt(a+b*tan(d+e*x)+c*tan(d+e*x)^2)))/(e*sqrt(c))-arctanh((b^2+(a-c)*(a-c+sqrt(a^2+b^2-2*a*c+c^2))+b*sqrt(a^2+b^2-2*a*c+c^2)*tan(d+e*x))/((a^2+b^2-2*a*c+c^2)^(1/4)*sqrt(2)*sqrt(a^2+b^2+c*(c-sqrt(a^2+b^2-2*a*c+c^2))-a*(2*c-sqrt(a^2+b^2-2*a*c+c^2)))*sqrt(a+b*tan(d+e*x)+c*tan(d+e*x)^2)))*sqrt(a^2+b^2+c*(c-sqrt(a^2+b^2-2*a*c+c^2))-a*(2*c-sqrt(a^2+b^2-2*a*c+c^2)))/((a^2+b^2-2*a*c+c^2)^(1/4)*e*sqrt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+c*tan(d+e*x)^4)*tan(d+e*x)/(e*(sqrt(a)+sqrt(c)*tan(d+e*x)^2))-a^(1/4)*c^(1/4)*sqrt(cos(2*arctan(c^(1/4)*tan(d+e*x)/a^(1/4)))^2)/cos(2*arctan(c^(1/4)*tan(d+e*x)/a^(1/4)))*EllipticE(sin(2*arctan(c^(1/4)*tan(d+e*x)/a^(1/4))),sqrt(1/4*(2-b/(sqrt(a)*sqrt(c)))))*sqrt((a+b*tan(d+e*x)^2+c*tan(d+e*x)^4)/(sqrt(a)+sqrt(c)*tan(d+e*x)^2)^2)*(sqrt(a)+sqrt(c)*tan(d+e*x)^2)/(e*sqrt(a+b*tan(d+e*x)^2+c*tan(d+e*x)^4))+1/2*c^(1/4)*(a-b+c)*sqrt(cos(2*arctan(c^(1/4)*tan(d+e*x)/a^(1/4)))^2)/cos(2*arctan(c^(1/4)*tan(d+e*x)/a^(1/4)))*EllipticF(sin(2*arctan(c^(1/4)*tan(d+e*x)/a^(1/4))),sqrt(1/4*(2-b/(sqrt(a)*sqrt(c)))))*sqrt((a+b*tan(d+e*x)^2+c*tan(d+e*x)^4)/(sqrt(a)+sqrt(c)*tan(d+e*x)^2)^2)*(sqrt(a)+sqrt(c)*tan(d+e*x)^2)/(a^(1/4)*e*(sqrt(a)-sqrt(c))*sqrt(a+b*tan(d+e*x)^2+c*tan(d+e*x)^4))+1/2*c^(1/4)*sqrt(cos(2*arctan(c^(1/4)*tan(d+e*x)/a^(1/4)))^2)/cos(2*arctan(c^(1/4)*tan(d+e*x)/a^(1/4)))*EllipticF(sin(2*arctan(c^(1/4)*tan(d+e*x)/a^(1/4))),sqrt(1/4*(2-b/(sqrt(a)*sqrt(c)))))*(sqrt(a)+sqrt(c))*sqrt((a+b*tan(d+e*x)^2+c*tan(d+e*x)^4)/(sqrt(a)+sqrt(c)*tan(d+e*x)^2)^2)*(sqrt(a)+sqrt(c)*tan(d+e*x)^2)/(a^(1/4)*e*sqrt(a+b*tan(d+e*x)^2+c*tan(d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x)^2)/(a^(3/4)*e*sqrt(a+b*tan(d+e*x)^2+c*tan(d+e*x)^4))-1/2*c^(1/4)*(a-b+c)*sqrt(cos(2*arctan(c^(1/4)*tan(d+e*x)/a^(1/4)))^2)/cos(2*arctan(c^(1/4)*tan(d+e*x)/a^(1/4)))*EllipticF(sin(2*arctan(c^(1/4)*tan(d+e*x)/a^(1/4))),sqrt(1/4*(2-b/(sqrt(a)*sqrt(c)))))*sqrt((a+b*tan(d+e*x)^2+c*tan(d+e*x)^4)/(sqrt(a)+sqrt(c)*tan(d+e*x)^2)^2)*(sqrt(a)+sqrt(c)*tan(d+e*x)^2)/(a^(1/4)*e*(sqrt(a)-sqrt(c))*sqrt(a+b*tan(d+e*x)^2+c*tan(d+e*x)^4))+1/4*(a-b+c)*sqrt(cos(2*arctan(c^(1/4)*tan(d+e*x)/a^(1/4)))^2)/cos(2*arctan(c^(1/4)*tan(d+e*x)/a^(1/4)))*EllipticPi(sin(2*arctan(c^(1/4)*tan(d+e*x)/a^(1/4))),-1/4*(sqrt(a)-sqrt(c))^2/(sqrt(a)*sqrt(c)),sqrt(1/4*(2-b/(sqrt(a)*sqrt(c)))))*(sqrt(a)+sqrt(c))*sqrt((a+b*tan(d+e*x)^2+c*tan(d+e*x)^4)/(sqrt(a)+sqrt(c)*tan(d+e*x)^2)^2)*(sqrt(a)+sqrt(c)*tan(d+e*x)^2)/(a^(1/4)*c^(1/4)*e*(sqrt(a)-sqrt(c))*sqrt(a+b*tan(d+e*x)^2+c*tan(d+e*x)^4))-1/6*c^(1/4)*sqrt(cos(2*arctan(c^(1/4)*tan(d+e*x)/a^(1/4)))^2)/cos(2*arctan(c^(1/4)*tan(d+e*x)/a^(1/4)))*EllipticF(sin(2*arctan(c^(1/4)*tan(d+e*x)/a^(1/4))),sqrt(1/4*(2-b/(sqrt(a)*sqrt(c)))))*(3*a-b+sqrt(a)*sqrt(c))*sqrt((a+b*tan(d+e*x)^2+c*tan(d+e*x)^4)/(sqrt(a)+sqrt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os(2*arctan(c^(1/4)*tan(d+e*x)/a^(1/4)))*EllipticF(sin(2*arctan(c^(1/4)*tan(d+e*x)/a^(1/4))),sqrt(1/4*(2-b/(sqrt(a)*sqrt(c)))))*(sqrt(a)-2*sqrt(c))*sqrt((a+b*tan(d+e*x)^2+c*tan(d+e*x)^4)/(sqrt(a)+sqrt(c)*tan(d+e*x)^2)^2)*(sqrt(a)+sqrt(c)*tan(d+e*x)^2)/(c^(3/4)*e*(sqrt(a)-sqrt(c))*sqrt(a+b*tan(d+e*x)^2+c*tan(d+e*x)^4))+1/4*sqrt(cos(2*arctan(c^(1/4)*tan(d+e*x)/a^(1/4)))^2)/cos(2*arctan(c^(1/4)*tan(d+e*x)/a^(1/4)))*EllipticPi(sin(2*arctan(c^(1/4)*tan(d+e*x)/a^(1/4))),-1/4*(sqrt(a)-sqrt(c))^2/(sqrt(a)*sqrt(c)),sqrt(1/4*(2-b/(sqrt(a)*sqrt(c)))))*(sqrt(a)+sqrt(c))*sqrt((a+b*tan(d+e*x)^2+c*tan(d+e*x)^4)/(sqrt(a)+sqrt(c)*tan(d+e*x)^2)^2)*(sqrt(a)+sqrt(c)*tan(d+e*x)^2)/(a^(1/4)*c^(1/4)*e*(sqrt(a)-sqrt(c))*sqrt(a+b*tan(d+e*x)^2+c*tan(d+e*x)^4))],
[tan(d+e*x)^2/sqrt(a+b*tan(d+e*x)^2+c*tan(d+e*x)^4),x,4,-1/2*arctan(sqrt(a-b+c)*tan(d+e*x)/sqrt(a+b*tan(d+e*x)^2+c*tan(d+e*x)^4))/(e*sqrt(a-b+c))+1/2*a^(1/4)*sqrt(cos(2*arctan(c^(1/4)*tan(d+e*x)/a^(1/4)))^2)/cos(2*arctan(c^(1/4)*tan(d+e*x)/a^(1/4)))*EllipticF(sin(2*arctan(c^(1/4)*tan(d+e*x)/a^(1/4))),sqrt(1/4*(2-b/(sqrt(a)*sqrt(c)))))*sqrt((a+b*tan(d+e*x)^2+c*tan(d+e*x)^4)/(sqrt(a)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*c*tan(d+e*x)^2)/((a-b+c)*(b^2-4*a*c)*e*sqrt(a+b*tan(d+e*x)^2+c*tan(d+e*x)^4))-(b-2*c)*sqrt(c)*sqrt(a+b*tan(d+e*x)^2+c*tan(d+e*x)^4)*tan(d+e*x)/((a-b+c)*(b^2-4*a*c)*e*(sqrt(a)+sqrt(c)*tan(d+e*x)^2))+a^(1/4)*(b-2*c)*c^(1/4)*sqrt(cos(2*arctan(c^(1/4)*tan(d+e*x)/a^(1/4)))^2)/cos(2*arctan(c^(1/4)*tan(d+e*x)/a^(1/4)))*EllipticE(sin(2*arctan(c^(1/4)*tan(d+e*x)/a^(1/4))),sqrt(1/4*(2-b/(sqrt(a)*sqrt(c)))))*sqrt((a+b*tan(d+e*x)^2+c*tan(d+e*x)^4)/(sqrt(a)+sqrt(c)*tan(d+e*x)^2)^2)*(sqrt(a)+sqrt(c)*tan(d+e*x)^2)/((a-b+c)*(b^2-4*a*c)*e*sqrt(a+b*tan(d+e*x)^2+c*tan(d+e*x)^4))+1/2*c^(1/4)*sqrt(cos(2*arctan(c^(1/4)*tan(d+e*x)/a^(1/4)))^2)/cos(2*arctan(c^(1/4)*tan(d+e*x)/a^(1/4)))*EllipticF(sin(2*arctan(c^(1/4)*tan(d+e*x)/a^(1/4))),sqrt(1/4*(2-b/(sqrt(a)*sqrt(c)))))*sqrt((a+b*tan(d+e*x)^2+c*tan(d+e*x)^4)/(sqrt(a)+sqrt(c)*tan(d+e*x)^2)^2)*(sqrt(a)+sqrt(c)*tan(d+e*x)^2)/(a^(1/4)*(a-b+c)*e*(sqrt(a)-sqrt(c))*sqrt(a+b*tan(d+e*x)^2+c*tan(d+e*x)^4))-1/4*sqrt(cos(2*arctan(c^(1/4)*tan(d+e*x)/a^(1/4)))^2)/cos(2*arctan(c^(1/4)*tan(d+e*x)/a^(1/4)))*EllipticPi(sin(2*arctan(c^(1/4)*tan(d+e*x)/a^(1/4))),-1/4*(sqrt(a)-sqrt(c))^2/(sqrt(a)*sqrt(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t[b^2 - 4*a*c])])/(Sqrt[2]*a^2*Sqrt[-c]*(b^2 - 4*a*c)*e*Sqrt[a + b*Tan[d + e*x]^2 + c*Tan[d + e*x]^4]) - (Sqrt[b + Sqrt[b^2 - 4*a*c]]*(b^3 - 4*a*b*c - Sqrt[b^2 - 4*a*c]*(b^2 - 3*a*c))*EllipticF[ArcSin[(Sqrt[2]*Sqrt[-c]*Tan[d + e*x])/Sqrt[b + Sqrt[b^2 - 4*a*c]]], (b + Sqrt[b^2 - 4*a*c])/(b - Sqrt[b^2 - 4*a*c])]*Sqrt[1 + (2*c*Tan[d + e*x]^2)/(b - Sqrt[b^2 - 4*a*c])]*Sqrt[1 + (2*c*Tan[d + e*x]^2)/(b + Sqrt[b^2 - 4*a*c])])/(Sqrt[2]*a^2*Sqrt[-c]*(b^2 - 4*a*c)*e*Sqrt[a + b*Tan[d + e*x]^2 + c*Tan[d + e*x]^4]) - (2*(b^2 - 3*a*c)*Cot[d + e*x]*Sqrt[a + b*Tan[d + e*x]^2 + c*Tan[d + e*x]^4])/(a^2*(b^2 - 4*a*c)*e) - ((b - Sqrt[b^2 - 4*a*c])^2*Tan[d + e*x]*Sqrt[a + b*Tan[d + e*x]^2 + c*Tan[d + e*x]^4])/(4*a^2*(a - b + c)*Sqrt[b^2 - 4*a*c]*e*(1 + (2*c*Tan[d + e*x]^2)/(b + Sqrt[b^2 - 4*a*c]))) + (b*c*Tan[d + e*x]*Sqrt[a + b*Tan[d + e*x]^2 + c*Tan[d + e*x]^4])/(a^2*(b^2 - 4*a*c)*(1 - (2*c)/(b - Sqrt[b^2 - 4*a*c]))*e*(1 + (2*c*Tan[d + e*x]^2)/(b + Sqrt[b^2 - 4*a*c]))) + (c*(1 + b/Sqrt[b^2 - 4*a*c])*Tan[d + e*x]*Sqrt[a + b*Tan[d + e*x]^2 + c*Tan[d + e*x]^4])/(a^2*(b - 2*c - Sqrt[b^2 - 4*a*c])*e*(1 + (2*c*Tan[d + e*x]^2)/(b - Sqrt[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